<template>
  <div id="login_content">
    <div class="middle-box">
      <div class="title"><img class="logo" src="../../assets/img/logo2.png" alt=""><span>北海市货运源头企业信息采集系统</span></div>
      <login-panel class="panel" />
    </div>
  </div>
</template>

<script>
import loginPanel from './cpns/loginPanel.vue'
import localCache from '@/utils/localCache'

export default {
  components: {
    loginPanel
  },
  created () {
    if (!localCache.getItem('token')) {
      this.$router.push('/')
    } else {
      this.$router.push('/bashboard/bashboard')
    }
  }
}
</script>

<style scoped>
#login_content {
  display: flex;
  height: 100%;
  background-image: url("~@/assets/img/bj3.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  justify-content: center;
  align-items: center;
}
.middle-box {
  position: relative;
  width: 80%;
  height: 75%;
  max-height: 780px;
  max-width: 1500px;
  background-image: url("~@/assets/img/bj2.png");
  background-size: cover;
  background-repeat: repeat;
  background-position: center center;
  border-radius: 15px;
  box-shadow: 0px 4px 12px 0px #333;
}
.title {
  display: flex;
  position: absolute;
  top: -85px;
  left: 0;
  font-size: 40px;
  color: #fff;
  font-weight: 700;
  z-index: 99;
  align-items: flex-end;
}
.panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
</style>
